import java.awt.Point;
import java.util.ArrayList;

/**
 * Abstract class of a Piece object
 * 
 * @author Jordan Beland
 *
 */
public abstract class Piece {

	protected int x;
	protected int y;
	protected ArrayList<Point> moves;
	
	
	/**
	 * Constructor for Piece 0bject
	 * @author Jordan Beland
	 */
	public Piece(int x, int y) {
		this.x = x;
		this.y = y;
		this.moves = possibleMoves();
	}

	/**
	 * default getter for x instance variable
	 * @author Jordan Beland
	 * @return x
	 */
	public int getX() {
		return x;
	}

	/**
	 * default getter for Y instance variable
	 * @author Jordan Beland
	 * @return y
	 */
	public int getY() {
		return y;
	}
	
	public void setX(int x) {
	    this.x = x;
	}
	
	public void setY(int y) {
	    this.y = y;
	}

	/**
	 * returns the list of possible moves of the piece.
	 * @author Jordan Beland
	 * @return moves
	 */
	public ArrayList<Point> getMoves(){
		return this.moves;
	}
		
	/**
	 * calculates a list of possible moves for that piece at
	 * the current position.
	 * @author Jordan Beland
	 * @return ArrayList
	 */
	public abstract ArrayList<Point> possibleMoves();
	
}

